node: refactor package node#21105
Merged
Merged
Conversation
582c0aa to
124539d
Compare
9359c43 to
c471809
Compare
renaynay
commented
Jun 24, 2020
renaynay
commented
Jun 24, 2020
renaynay
commented
Jun 24, 2020
Contributor
Author
|
Notes from review:
func (n *Node) RegisterHTTP(path string, h http.Handler) error
|
renaynay
commented
Jul 1, 2020
renaynay
commented
Jul 1, 2020
renaynay
commented
Jul 1, 2020
renaynay
commented
Jul 1, 2020
renaynay
commented
Jul 1, 2020
fjl
reviewed
Jul 1, 2020
| @@ -457,24 +450,23 @@ func startNode(ctx *cli.Context, stack *node.Node) { | |||
| if ctx.GlobalString(utils.SyncModeFlag.Name) == "light" { | |||
Contributor
There was a problem hiding this comment.
I think everything in this block is code that only works for full nodes.
We should create an auxiliary function for setting up *eth.Ethereum specifically
and then put a type assertion for *eth.Ethereum here.
Contributor
Author
|
HTTP Rule: flags:
console:
|
Contributor
Author
|
TODO:
extra:
|
renaynay
commented
Jul 6, 2020
badcdba to
a49a20b
Compare
renaynay
commented
Jul 9, 2020
a26f56a to
cf15c83
Compare
I'm not happy with 'path' for this because we also have ResolvePath to find file paths in the datadir.
1 task
1 task
This was referenced Feb 24, 2021
enriquefynn
pushed a commit
to enriquefynn/go-ethereum
that referenced
this pull request
Mar 10, 2021
This PR significantly changes the APIs for instantiating Ethereum nodes in a Go program. The new APIs are not backwards-compatible, but we feel that this is made up for by the much simpler way of registering services on node.Node. You can find more information and rationale in the design document: https://gist.github.com/renaynay/5bec2de19fde66f4d04c535fd24f0775. There is also a new feature in Node's Go API: it is now possible to register arbitrary handlers on the user-facing HTTP server. In geth, this facility is used to enable GraphQL. There is a single minor change relevant for geth users in this PR: The GraphQL API is no longer available separately from the JSON-RPC HTTP server. If you want GraphQL, you need to enable it using the ./geth --http --graphql flag combination. The --graphql.port and --graphql.addr flags are no longer available.
gastonponti
added a commit
to celo-org/celo-blockchain
that referenced
this pull request
Jul 13, 2021
Merge from upstream, go-ethereum v 1.9.19 (https://github.com/ethereum/go-ethereum/releases/tag/v1.9.19) Geth v1.9.19 is our regular maintenance release Note, if you were using GraphQL previously, it was moved to the HTTP RPC endpoint. The old --graphql.host and --graphql.port flags will not work any more. You might need to adjust your TOML config files accordingly too. 1.9.19 Notes: Deprecated flags: GraphQLListenAddrFlag GraphQLPortFlag Added flags: CacheTrieJournalFlag CacheTrieRejournalFlag 28c5a8a fetcher.go/mainLoop check ancestor, otherwise the lightest sync could panic fetcher.go/newLightFetcher Add downloader.SyncMode as parameter c0c0161 (ethereum/go-ethereum#21105) node.go: startNetworking should server stop if proxyServer failed main.go startNode runnerFactory replaced 90dedea this commit tried to fusion the consensus/istanbul/core/event.go file with an erased tests (signed_data_internal_test.go) Restored that test, and add the changes from the signer/core/signed_data.go, to the shared/signer/signed_data.go c28fd9c make Berlin a copy of Istanbul instead of YoloV1 Backwards compatibility The commit c0c0161 (ethereum/go-ethereum#21105) "changes the APIs for instantiating Ethereum nodes in a Go program. The new APIs are not backwards-compatible" (following this proposal https://gist.github.com/renaynay/5bec2de19fde66f4d04c535fd24f0775)
19 tasks
JukLee0ira
added a commit
to JukLee0ira/XDPoSChain
that referenced
this pull request
Apr 8, 2025
gzliudan
pushed a commit
to XinFinOrg/XDPoSChain
that referenced
this pull request
Apr 10, 2025
gzliudan
pushed a commit
to XinFinOrg/XDPoSChain
that referenced
this pull request
Apr 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR significantly changes the APIs for instantiating Ethereum nodes in a Go program. The new APIs are not backwards-compatible, but we feel that this is made up for by the much simpler way of registering services on node.Node. You can find more information and rationale in the design document: https://gist.github.com/renaynay/5bec2de19fde66f4d04c535fd24f0775.
There is also a new feature in Node's Go API: it is now possible to register arbitrary handlers on the user-facing HTTP server. In geth, this facility is used to enable GraphQL.
There is a single minor change relevant for geth users in this PR: The GraphQL API is no longer available separately from the JSON-RPC HTTP server. If you want GraphQL, you need to enable it using the
--http --graphqlflag combination. The--graphql.portand--graphql.addrflags are no longer available.[ + ] Introduces
Lifecycleinterface[ + ] Introduces
RegisterAPIs()method[ + ] Introduces
RegisterLifecycle()method[ + ] Introduces
RegisterHTTP()method[ + ] Introduces
RegisterProtocols()method[<>] Changes the way information about node's HTTP servers is stored
[<>] Separates
LES servermanagement frometh.Ethereum, now managed bynode[<>] GraphQL can only be started on the node's canonical HTTP server (to enable graphql
--graphql, the user must also enable http with the--httpflag)[ - ] Removes
Serviceinterface[ - ] Removes
ServiceContext[ - ] Removes the responsibility of service construction
TODO
RegisterHTTPmethodscmd/geth/main.go